-
Notifications
You must be signed in to change notification settings - Fork 319
Added QR Code Scanner Extension #2386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
!format |
|
The formatting bot didn't find any formatting issues. It currently only checks the extensions folder. The author or a maintainer can run terminal command 'npm run format' manually to format all files. |
|
I'm just going to let you know straight up—the review process will likely take weeks or months. This is a volunteer maintained repository we're not always reviewing things. You can see our backlog of 97 pull requests.... Either way, I'll try to help you as best I can, and a smaller extension like this usually goes faster. Just requesting patience |
Ok, thank you for maintaining Turbowarp, it is amazing! |
|
You'll want to make a few changes. Read the contributing guidelines. Although an extension like this likely wouldn't break any rules, you do need to add the header metadata comments: Also, you need to organize the file structure properly. Create a new folder with a username of choice in /extensions/, then add that path to extensions.json without the .js file extension example: After that, you need to wrap block text in Some of this may seem overwhelming, so I'll do my best to guide you step-by step. There's a few things I can do for you as well but not everything |
|
If you'd like, I can make a pull request on your fork's branch to make these changes |
Brackets-Coder
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't gotten to the block code yet, but something like this should help:
| @@ -0,0 +1,112 @@ | |||
| (function(Scratch) { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| (function(Scratch) { | |
| // Name: QR Scanner | |
| // ID: sweetsebiQR | |
| // Description: Example description. Enables the scanning of QR codes. | |
| // By: Sweetsebi <https://scratch.mit.edu/users/Sweetsebi> | |
| // License: MPL-2.0 | |
| (function(Scratch) { |
| const script = document.createElement('script'); | ||
| script.src = 'https://cdn.jsdelivr.net/npm/[email protected]/dist/jsQR.min.js'; | ||
| document.head.appendChild(script); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like this might work:
| const script = document.createElement('script'); | |
| script.src = 'https://cdn.jsdelivr.net/npm/[email protected]/dist/jsQR.min.js'; | |
| document.head.appendChild(script); | |
| Scratch.external.importModule("https://cdn.jsdelivr.net/npm/[email protected]/dist/jsQR.min.js") |
Co-authored-by: Brackets-Coder <[email protected]>
Co-authored-by: Brackets-Coder <[email protected]>
|
Hello @sebastianmas-cyber, just wanted to check in and see if there was anything else I can do for you! |
|
!format |
I doubt I have permissions for that but it's worth a shot |
|
!format |
|
The formatting bot didn't find any formatting issues. It currently only checks the extensions folder. The author or a maintainer can run terminal command 'npm run format' manually to format all files. |
@Brackets-Coder the extension JS file is in the root of the branch and not the extensions folder |
Yeah, that's one of the things I mentioned that need to be fixed for this PR but I wasn't thinking when I ran format |
I coded my own extension, can you please review it and add it to the Turbowarp Extension gallery?